<script setup>
import { RouterView } from 'vue-router'
</script>

<template>
  <div class="game-forum">
    <!-- 顶部导航栏 -->
    <header class="forum-header">
      <div class="header-container">
        <div class="logo">
          <h1>4399游戏论坛</h1>
        </div>
        <nav class="main-nav">
          <a href="#" class="nav-item active">首页</a>
          <a href="#" class="nav-item">游戏专区</a>
          <a href="#" class="nav-item">玩家朋友</a>
          <a href="#" class="nav-item">玩家朋友</a>
          <a href="#" class="nav-item">玩家朋友</a>
        </nav>
        <div class="user-actions">
          <button class="login-btn">登录</button>
          <button class="register-btn">注册</button>
        </div>
      </div>
    </header>

    <!-- 主要内容区域 -->
    <main class="forum-main">
      <RouterView />
    </main>

    <!-- 底部区域 -->
    <footer class="forum-footer">
      <div class="footer-container">
        <p>© 2023 4399游戏论坛 - 专业的游戏交流社区</p>
        <p>免责声明 | 联系我们 | 帮助中心</p>
      </div>
    </footer>
  </div>
</template>

<style scoped>
.game-forum {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.forum-header {
  background-color: #ff6600;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.logo h1 {
  margin: 0;
  font-size: 1.8rem;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-item {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-item:hover,
.nav-item.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.user-actions {
  display: flex;
  gap: 1rem;
}

.login-btn, .register-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.login-btn {
  background-color: #fff;
  color: #ff6600;
}

.login-btn:hover {
  background-color: #f0f0f0;
}

.register-btn {
  background-color: #ffcc00;
  color: #333;
}

.register-btn:hover {
  background-color: #e6b800;
}

.forum-main {
  flex: 1;
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
  width: 100%;
  overflow-y: auto;
}

.forum-footer {
  background-color: #333;
  color: white;
  padding: 1rem 0;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

.footer-container p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

/* 16:9比例适配 */
@media (min-width: 1024px) {
  .game-forum {
    height: 100%;
  }
  
  .forum-main {
    margin: 1rem auto;
    flex: 1;
    overflow-y: auto;
  }
  
  .forum-footer {
    padding: 1rem 0;
  }
}
</style>
